package com.huan.study.mybatis.service.impl;

import com.huan.study.mybatis.entity.Customer;
import com.huan.study.mybatis.mappers.CustomerMapper;
import com.huan.study.mybatis.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author YanXxx
 * @date 2022-11-03 20:31
 */
@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;

    @Override
    public int addCustomer(Customer customer) {
        return customerMapper.addCustomer(customer);
    }

    @Override
    public Customer findCustomer(Customer customer) {
        return customerMapper.findCustomer(customer);
    }

    @Override
    public List<Customer> findCustomerList(Customer customer) {
        return customerMapper.findCustomerList(customer);
    }

    @Override
    public List<Map> findCustomerListMap(Customer customer) {
        return customerMapper.findCustomerListMap(customer);
    }

    @Override
    public int batchInsert(List<Customer> list) {
        return customerMapper.batchInsert(list);
    }
}
